﻿using DataAccess;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;

namespace Logic
{
    public class FS0102_SubLogic
    {
        FS0102_SubDataAccess fs0101_SubDataAccess = new FS0102_SubDataAccess();
        FS0102DataAccess fs0101DataAccess = new FS0102DataAccess();

        #region 保存
        public string Save(string strProjectNo)
        {
            #region 先判断是否存在
            DataTable dt = fs0101DataAccess.Search2(strProjectNo);
            if (dt!=null && dt.Rows.Count>0)
            {
                return "此项目已存在！";
            }
            #endregion

            #region 不存在才会新增
            else
            {
                fs0101_SubDataAccess.Save(strProjectNo);
                return "";
            }
            #endregion

        }
        #endregion
    }
}
